{% for product in products %}
  <li product-type-id="{{ product.type.pk }}"><a href="#" product-id="{{ product.pk }}" unit="{{ product.unit }}" price-per-unit="{{ product.price_per_unit }}" cost-per-unit="{{ product.cost_per_unit }}" style="background:{{ product.color_hex }};">{{ product.name }}</a></li>
{% endfor %}

{% for basket in baskets %}
  <li product-type-id="basket"><a href="#" product-id="{{ basket.pk }}" unit="{{ basket.unit }}" price-per-unit="{{ basket.price_per_unit }}" style="background:{{ product.color_hex }};">{{ basket.name }}</a></li>
{% endfor %}